import React, { Component } from 'react';
// import imgUrl from '../assets/images/logo192.png'
import Title from './Title'
import Content from './Content'

class Detail extends Component {
  // state = {
  //   title: '哈哈哈',
  //   desc: '这是一个商品',
  //   url: imgUrl
  // }

  render() {
    const { title, desc, url } = this.props
    return (
      <div>
        {/* 传递自定义属性 */}
        <Title title={ title }></Title>
        <Content desc={ desc }></Content>
        <img src={url} alt="" />
      </div>
    );
  }
}

export default Detail;
